import axios from './axios'
import qs from 'qs'
import {appUrl} from '@/config/config'
// /bdc/api/app/users/{id}/password
export const changePassWord = (params) => {
    return new Promise((resolve, reject) => {
        axios({
            url: appUrl + '/bdc/api/app/users/' + params.id + '/password',
            method: 'put',
            data: params.param
        }).then(res => {
            resolve(res)
        }).catch(
            res => {
                reject(res)
            }
        )
    })
}
// 修改老师头像 /bdc/api/app/users/{id}/teacherHeadImg
export const teacherHeadImg = (params) => {
    return new Promise((resolve, reject) => {
        axios({
            url: appUrl + '/bdc/api/app/users/' + params.id + '/teacherHeadImg',
            method: 'put',
            data: params.param
        }).then(res => {
            resolve(res)
        }).catch(
            res => {
                reject(res)
            }
        )
    })
}
// 修改家长头像 /bdc/api/app/users/{id}/parentHeadImg
export const parentHeadImg = (params) => {
    return new Promise((resolve, reject) => {
        axios({
            url: appUrl + '/bdc/api/app/users/' + params.id + '/parentHeadImg',
            method: 'put',
            data: params.param
        }).then(res => {
            resolve(res)
        }).catch(
            res => {
                reject(res)
            }
        )
    })
}